{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 直观理解高斯核函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = np.arange(-4, 5, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-4, -3, -2, -1,  0,  1,  2,  3,  4])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y = np.array((x >= -2) & (x <= 2), dtype='int')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 1, 1, 1, 1, 1, 0, 0])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAD8CAYAAABkbJM/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEs5JREFUeJzt3X+s3fV93/HnawZWtB8FhOcYG8+OdIvktJlLjwjV1Cpq\nYLFZVZNKrcy24maRXGul66QomxlS2nWahIq6TNEYyFlRiBYFoTYJXurOJV5W/ikt1w1xcKjnG6+Z\n7RjsJgvdFAsCee+P83V6uDm+93PvOfeeY/x8SEf3++Pz+Z4Xxscvn+/3nK9TVUiStJi/NukAkqTL\ng4UhSWpiYUiSmlg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24438>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x[y==0], [0]*len(x[y==0]))\n",
    "plt.scatter(x[y==1], [0]*len(x[y==1]))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def gaussian(x, l):\n",
    "    gamma = 1.0\n",
    "    return np.exp(-gamma * (x-l)**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "l1, l2 = -1, 1\n",
    "\n",
    "X_new = np.empty((len(x), 2))\n",
    "for i, data in enumerate(x):\n",
    "    X_new[i, 0] = gaussian(data, l1)\n",
    "    X_new[i, 1] = gaussian(data, l2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEDNJREFUeJzt3X+s3XV9x/Hna21JanStk6vRtozOINpI2fCKbJoNRzZa\nFlI1hoA/yIgZIRPxLwMuGRrcosYsmgakaQghJotNMwmWDWULRlnC2LgN2IKk5g4jbTHhitIl2AQK\n7/1xDnC5tj3nwPnR8+nzkTS353M+uef9yWme+d5z7+lNVSFJasvvTHoASdLwGXdJapBxl6QGGXdJ\napBxl6QGGXdJapBxl6QGGXdJapBxl6QGLZ/UA5966ql1+umnT+rhJWkq7d69+5dVNdNr38Tifvrp\npzM3Nzeph5ekqZTk5/3s82UZSWqQcZekBhl3SWqQcZekBhl3SWpQz7gnuTXJk0kePsb9SbI1yXyS\nPUnOGf6YA9izE77+bvji6s7HPTsnOo4kTUI/V+63AZuOc/9m4IzunyuBm1/7WK/Snp1w5zVwaD9Q\nnY93XmPgJZ10esa9qu4FfnWcLVuAb1XH/c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XxLyv8AfAKcAPwY2LNlz\nEfA9IMB5wH9Peu4Rn/dPgDd2/7659fMu2vcDOr9b4KOTnnsMz/Fq4CfAad3bb5703CM+798BX+3+\nfQb4FXDKpGd/DWf+U+Ac4OFj3D/SZk3Llfu5wHxVPVZVzwI7gC1L9mwBvlUd9wOrk7x13IMOSc/z\nVtV9VfXr7s376fze2mnVz/ML8BngO8CT4xxuRPo588eA26vqcYCqmuZz93PeAt7Q/c1ur6cT9yPj\nHXN4qupeOmc4lpE2a1rivgbYv+j2ge7aoHumxaBn+RSdK4Bp1fO8SdYAHwZuHuNco9TPc/wO4I1J\nfphkd5LLxzbd8PVz3huBdwFPAHuBz1bVC+MZbyJG2qy+fs2eTlxJPkgn7h+Y9Cwj9g3g2qp6Id1f\njH4SWA68B7gAWAn8V5L7q+qnkx1rZC4EHgL+HHg78B9J/rOq/m+yY02naYn7QWDdottru2uD7pkW\nfZ0lyUbgFmBzVT01ptlGoZ/zzgI7umE/FbgoyZGqumM8Iw5dP2c+ADxVVc8AzyS5FzgbmMa493Pe\nK4CvVOcF6fkkPwPeCfzPeEYcu5E2a1pelnkAOCPJ+iSnAJcCu5bs2QVc3v0O9HnAoar6xbgHHZKe\n501yGnA78MkGruR6nreq1lfV6VV1OvAvwN9Ocdihv3/T3wU+kGR5ktcB7wMeHfOcw9LPeR+n81UK\nSd4CnAk8NtYpx2ukzZqKK/eqOpLkauBuOt91v7WqHklyVff+bXR+guIiYB74DZ2rgKnU53mvB94E\nfLN7NXukpvQ/X+rzvE3p58xV9WiS7wN7gBeAW6rqqD9Wd6Lr8zn+EnBbkr10foLk2qqa2v8tMsm3\ngfOBU5McAL4ArIDxNMt3qEpSg6blZRlJ0gCMuyQ1yLhLUoOMuyQ1yLhLUoOMuyQ1yLhLUoOMuyQ1\n6P8B0TWCEyVMrKwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10f150ac8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X_new[y==0,0], X_new[y==0,1])\n",
    "plt.scatter(X_new[y==1,0], X_new[y==1,1])\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
